/* games.css - 游戏大厅页面专用样式 */

/* 页面标题部分 */
.game-page-title {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* 游戏分类导航 */
.game-categories {
  display: flex;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  scrollbar-width: thin;
}

.game-categories::-webkit-scrollbar {
  height: 4px;
}

.game-categories::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}

.game-categories::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

/* 游戏卡片样式 */
.game-card {
  transition: all 0.3s ease;
  border-radius: 0.75rem;
  overflow: hidden;
  background-color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.game-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.game-card:hover .game-card-img {
  transform: scale(1.05);
}

.game-card-content {
  padding: 1.25rem;
}

.game-card-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: var(--color-dark);
}

.game-card-desc {
  color: var(--color-gray-600);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
}

.play-game-btn {
  transition: all 0.2s ease;
}

.play-game-btn:hover {
  transform: scale(1.05);
}

/* 游戏标签样式 */
.game-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* 即将上线游戏 */
.coming-soon-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--color-warning);
  color: var(--color-dark);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.game-card.coming-soon {
  opacity: 0.7;
}

.game-card.coming-soon .game-card-img {
  filter: grayscale(1);
}

/* 游戏搜索框 */
.game-search {
  position: relative;
  margin-bottom: 1rem;
}

.game-search input {
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  width: 100%;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.game-search input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.2);
}

.game-search i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

/* 排序下拉框 */
.sort-dropdown {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background-color: white;
  font-size: 0.875rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-chevron-down' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 0.75rem;
  padding-right: 2rem;
}

.sort-dropdown:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.2);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .game-categories {
    -webkit-overflow-scrolling: touch;
  }
  
  .game-card-img {
    height: 150px;
  }
  
  .game-search-sort {
    flex-direction: column;
  }
  
  .game-search {
    width: 100%;
    margin-bottom: 1rem;
  }
}

/* 游戏详情页元素 */
.game-details {
  background-color: white;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.game-details-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}

.game-details-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.game-details-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.game-details-description {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* 游戏大厅卡片样式 - 给首页使用 */
.game-hall-card {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.game-hall-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.15);
}

.game-hall-card-content {
  position: relative;
  z-index: 1;
  padding: 1.5rem;
  color: white;
}

.game-hall-card-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.game-hall-card-desc {
  opacity: 0.9;
  margin-bottom: 1rem;
}

.game-hall-card-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  color: white;
  font-weight: 500;
  transition: all 0.2s ease;
}

.game-hall-card-link:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: translateX(5px);
}

.game-hall-card-decoration {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  font-size: 4rem;
  opacity: 0.15;
}

/* 游戏数量标记 */
.games-count {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: rgba(255, 183, 3, 0.9);
  color: white;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: bold;
}

/* 动画效果 */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.pulse-animation {
  animation: pulse 2s infinite;
}
